package com.zhongen.oa.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhongen.common.security.service.PigUser;
import com.zhongen.common.security.util.SecurityUtils;
import com.zhongen.oa.entity.NotifyAnnouncementSocietyEntity;
import com.zhongen.oa.mapper.NotifyAnnouncementSocietyMapper;
import com.zhongen.oa.service.NotifyAnnouncementSocietyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 公告信息
 *
 * @author Code Generator
 * @date 2024-02-27 09:48:24
 */
@Service
public class NotifyAnnouncementSocietyServiceImpl
		extends ServiceImpl<NotifyAnnouncementSocietyMapper, NotifyAnnouncementSocietyEntity>
		implements NotifyAnnouncementSocietyService {

	@Autowired
	NotifyAnnouncementSocietyMapper notifyAnnouncementSocietyMapper;

	@Override
	public IPage<NotifyAnnouncementSocietyEntity> queryNotifyAnnouncementSocietyList(Page page,
			NotifyAnnouncementSocietyEntity notifyAnnouncementSociety) {
		return notifyAnnouncementSocietyMapper.queryNotifyAnnouncementSocietyList(page, notifyAnnouncementSociety);
	}

	@Override
	public IPage<NotifyAnnouncementSocietyEntity> getNotifyAnnouncementSocietyPageApp(Page page,
			NotifyAnnouncementSocietyEntity notifyAnnouncementSociety) {
		return notifyAnnouncementSocietyMapper.getNotifyAnnouncementSocietyPageApp(page, notifyAnnouncementSociety);
	}

	@Override
	public boolean insertNotifyAnnouncementSociety(NotifyAnnouncementSocietyEntity notifyAnnouncementSociety) {
		notifyAnnouncementSociety.setDelFlag(0);
		return notifyAnnouncementSocietyMapper.insert(notifyAnnouncementSociety) > 0;
	}

	@Override
	public boolean updateById(NotifyAnnouncementSocietyEntity notifyAnnouncementSociety) {
		return notifyAnnouncementSocietyMapper.updateById(notifyAnnouncementSociety) > 0;
	}

}
